package com.kith.controller;

import com.kith.dao.StudentDao;
import com.kith.domian.Student;
import com.kith.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HelloController {

    @Autowired
    StudentService StudentService;

    @RequestMapping("hello")
    public List<Student> hello(){
        return StudentService.findAll();
    }
}
